window.addEventListener("load", function(e) {
        var appContent = document.getElementById("appcontent");
        appContent.addEventListener("DOMContentLoaded", function(e) {
		var doc = e.originalTarget; 
		var win = doc.defaultView;
		if(win.location.href.search(/\/\/www\.youtube\.com/gi) != -1)
		{
		    if(doc.cookie.search(/\&f2\=40000000/) == -1)
		    {
	      	  var date=new Date();
		        date.setDate(date.getDate()+5);
	      	  if(doc.cookie.match(/PREF=([^ ]+); /g))
				doc.cookie='PREF='+RegExp.$1+'&f2=40000000; path=/; domain=.youtube.com; expires='+date.toGMTString();
		  }
		}
        }, true);
}, false);
